package com.stylefeng.guns.modular.system.warpper;

import java.util.Map;

import com.stylefeng.guns.core.base.warpper.BaseControllerWarpper;

public class DashBoardWarpper extends BaseControllerWarpper{

	public DashBoardWarpper(Object list) {
        super(list);
    }

    @Override
    public void warpTheMap(Map<String, Object> map) {
    	Double gLastPx = (Double)map.get("gLastPx");
    	Double gPxChange = (Double)map.get("gPxChange");
    	Double gPxChangeRate = (Double)map.get("gPxChangeRate");
    	String gName = (String)map.get("gName");
    	if(gPxChange > 0){
    		map.put("gName", "&nbsp;&nbsp;<font color='red' font size='3'><b>" + gName + "</b></font>&nbsp;&nbsp;");
    		map.put("gLastPx", "<font color='red' font size='3'><b>" + gLastPx + "</b></font>&nbsp;&nbsp;");
    		map.put("gPxChange", "<font color='red' font size='3'><b>涨跌额：" + gPxChange + "</b></font>&nbsp;&nbsp;");
    		map.put("gPxChangeRate", "<font color='red' font size='3'><b>涨跌幅：" + gPxChangeRate + "%</b></font>");
    	}else{
    		map.put("gName", "&nbsp;&nbsp;<font color='green' font size='3'><b>" + gName + "</b></font>&nbsp;&nbsp;");
    		map.put("gLastPx", "<font color='green' font size='3'><b>" + gLastPx + "</b></font>&nbsp;&nbsp;");
    		map.put("gPxChange", "<font color='green' font size='3'><b>涨跌额：" + gPxChange + "</b></font>&nbsp;&nbsp;");
    		map.put("gPxChangeRate", "<font color='green' font size='3'><b>涨跌幅：" + gPxChangeRate + "%</b></font>");
    	}
    }
    
    
}
